﻿namespace NMortgage.UI.Tests
{

    using FluentValidation.TestHelper;

    using Microsoft.VisualStudio.TestTools.UnitTesting;

    using NMortgage.UI.Model;

    [TestClass]
    public class FeeValidatorTest : TestBase<FeeValidator>
    {
        #region Methods

        [TestMethod]
        public void FeeValidatorConstructorTest()
        {
            FeeValidator target = new FeeValidator();
            Assert.IsNotNull(target);
        }

        [TestMethod]
        public void Should_have_error_ramount_is_0_or_less()
        {
            Subject.ShouldHaveValidationErrorFor(v => v.Amount, 0d);
            Subject.ShouldHaveValidationErrorFor(v => v.Amount, -1d);
        }

        [TestMethod]
        public void Should_not_have_error_for_1()
        {
            Subject.ShouldNotHaveValidationErrorFor(v => v.Amount, 1d);
        }

        [TestInitialize]
        public void TestInitialize()
        {
            Subject = new FeeValidator();
        }

        #endregion Methods
    }
}